package com.mzz.behavior.classandclass.iterator;

/**
 * 迭代器模式测试类
 *
 * @author xushijian
 * @date 18/5/15 下午5:38
 */
public class Test {

    public static void main(String[] args) {

        Collection collection = new MyCollection();

        Iterator it = collection.iterator();

        while (it.hasNext()) {
            System.out.println(it.next());
        }
    }
}
